<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script>
    <title>Vue.js 2 Hello</title>
</head>

<body>
    <div id="app">
        <h1>Your input is {{ message }}</h1>
        <input type="text" v-model="message">
    </div>
    <div id="app2">
        <message content="你好, Vue.js 2"></message>
    </div>
    <script>
        var vm = new Vue({
            el: ' #app',
            data: {
                message: "你好, Vue.js!"
            }
        });
        var Message = Vue.extend({
            props: ['content'],
            template: '<h1>{{content}}</h1>'
        });
        Vue.component('message', Message);
        var app2 = new Vue({
            el: '#app2'
        })
    </script>
</body>

</html>